package com.mocha.common.core.auth;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author: songkui
 * @date: 2023/4/17 9:56
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class FunctionAuthBO {
    private String path;  //每个功能点路径，
    private String[] pattern;  //每个子菜单 模糊路径


    public boolean isNull(){
        return StrUtil.isEmpty(path) && (null == pattern || pattern.length == 0) ? true : false;
    }

    public boolean isAllPath(){
        return null != path && "ALL".equals(path) ? true : false;
    }

}
